<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<html>
<head>
    <script type="text/javascript">
    function upperCase(){
    var x=document.getElementById("fname").value
    document.getElementById("fname").value=x.toUpperCase()
    }
	function upper(){
		alert('OK')
	}
    </script>
    </head>
    <body>
    <input type="text" id="fname" onblur="upperCase()" />
	<input type="text"  onblur="upper()" />
</body>
</html>
</body>
</html>